﻿<?php
class UserAction extends Common {
	
	function index(){
		if($this->_memberDB->signed){
			P("用户登录:".$this->_memberDB->record["userid"]);
		} else {
			P('用户未登录.');
		}
		//$this->assign_by_ref();
		
		
	}
	function signin(){
		if($this->_memberDB->signed) {
			$this->error("用户已登录,如需重新登录,请先注销!",1,"index");
		}
		if( isset($_POST["userid"]) ){
			$_return=$this->_memberDB->signin($_POST["userid"],$_POST["pwd"]);
			if($_return==0){
				$this->success("用户登陆成功!",1,"index");
			} else {
				$this->error("用户名或密码错误!",1,"signin");
			}
		} else {
			$this->display();
		}
	}
	function signout(){
		$this->_memberDB->signout();
		$this->success("用户注销成功!",1,"index");
	}
	function signup(){}
}

/*End of file*/
